package com.xbongbong.pro.rabbitmq.application;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.retry.annotation.EnableRetry;

import java.util.Locale;


/**
 * 消息mq服务
 * @author 魏荣杰
 * @date 2019/1/30 14:20
 * @since v1.0
 * @version v1.0
 */
@SpringBootApplication
@EnableRetry
@ComponentScan(basePackages={"com.xbongbong","com.alibaba.dingtalk.openapi"})
@EnableFeignClients(basePackages = {"com.xbongbong.pro.rabbitmq.feign"})
public class ProRabbitMqApplication {
    private static final Logger LOG = LoggerFactory.getLogger(ProRabbitMqApplication.class);
    public static void main(String[] args) {
        System.setProperty("es.set.netty.runtime.available.processors", "false");
        try {
            // 设置系统线程默认语言包，LocaleContextHolder spring工具
            LocaleContextHolder.setDefaultLocale(Locale.CHINA);

            SpringApplication.run(ProRabbitMqApplication.class, args);
        } catch (Exception e) {
            LOG.error("ProRabbitMqApplication启动报错", e);
        }
    }

}
